<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let arr = [
            {
                pname: "华为手机",
                price: 5699
            },
            {
                pname: "华为手机2",
                price: 4699
            },
            {
                pname: "华为手机3",
                price: 5322
            },
            {
                pname: "华为手机4",
                price: 5788
            }
        ]

            // 筛选 价钱高于5000的手机 ，把price 前面加上 ￥5788 ，返还数据 。
            // var res = arr.filter((item)=>{return item.price>5000 })
            var res = arr.filter((item)=>item.price>5000);
             var res2 =  res.map(item=>({pname:item.pname,price:"￥"+item.price}));
            console.log(res2);

    </script>
</body>

</html>